<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
	<script>
		function load_projectlist(container) {
			var items=[]
			$.getJSON("/projectbase/list",function(data){
				$.each(data.projects,function(key,val){
					items.push("<li id='project"+key+"'>"+val+"</li>");
				});
				
				$(container).html($('<ul/>',{
					'class':'projects-list',
					html:items.join('')
				}));
			});
			//if(items.length<=0) {
			//	$(container).html("<div>You don't have any projects yet. Create a new project now.</div>");
			//}
		}
		$(function(){
			load_projectlist("#projectlist")
		});		
	</script>
	<style>

	</style>
</head>
<body>
	<section id="projectlist">
		
	</section>
</body>
</html>
